﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DTO;
using BUS;

namespace GUI
{
    public partial class Form1 : Form
    {
        public delegate void PassData(string value);

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //Login_Form frm = new Login_Form();
            //PassData data = new PassData(frm.funData);
            //data(this.txtUsername.Text);

            //frm.Show();

            DTO_NguoiDung nd = new DTO_NguoiDung();
            nd.TenDangNhap = txtUsername.Text;
            nd.MatKhau = txtPassword.Text;
 
 //           if (BUS_NguoiDung.KiemTra(nd))
            {
 //               MessageBox.Show("Đăng nhập thành công");

                Main frm_Main = new Main();
                frm_Main.Show();
                
                
            }
 //           else
  //              MessageBox.Show("Đăng nhập thất bại, bạn đã điền sai tên hoặc mật khẩu, vui lòng điền lại");
        }
    }
}
